<!--# layout("/common/layout.html",{"jsBase":"/js/order/finOrder/"}){ -->

<form class="layui-form layui-form-pane" id="addForm"  lay-filter="editform">
    <input type="hidden" name="orderNo" id="orderNo">

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">订单名称</label>
				<div class="layui-input-inline">
                        <span style="line-height:38px;margin-left:8px">
                            ${finOrder.orderName}
                        </span>
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">会员id</label>
				<div class="layui-input-inline">
                        <span style="line-height:38px;margin-left:8px">
                            ${finOrder.userId}
                        </span>
				</div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">购买数量</label>
				<div class="layui-input-inline">
                        <span style="line-height:38px;margin-left:8px">
                            ${finOrder.buyCount}
                        </span>
				</div>
            </div>

            <div class="layui-inline">
                <label class="layui-form-label">总价</label>
                <div class="layui-input-inline">
                        <span style="line-height:38px;margin-left:8px">
                            ${finOrder.totalMoney}
                        </span>
                </div>
            </div>

        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">

            <div class="layui-inline">
            <label class="layui-form-label">联系人</label>
				<div class="layui-input-inline">
                        <span style="line-height:38px;margin-left:8px">
                            ${finOrder.contactPerson}
                        </span>
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">联系电话</label>
				<div class="layui-input-inline">
                        <span style="line-height:38px;margin-left:8px">
                            ${finOrder.contactPhone}
                        </span>
				</div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
            <label class="layui-form-label">寄送地址</label>
				<div class="layui-input-inline">
                        <span style="line-height:38px;margin-left:8px">
                            ${finOrder.address}
                        </span>
				</div>
            </div>
            <div class="layui-inline">
            <label class="layui-form-label">客户备注</label>
				<div class="layui-input-inline">
                        <span style="line-height:38px;margin-left:8px">
                            ${finOrder.customerMemo}
                        </span>
				</div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">快递类型</label>
                <layui:simpleDictSelect style='layui-input-inline' type="EXPRESS_TYPE" layVerify="required"
                                        id="express" name="express" value="" />
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">快递单号</label>
                <div class="layui-input-inline">
                    <input type="text" name="expressNum" id="expressNum" autocomplete="off" maxlength="50" class="layui-input" oninput="value=value.replace(/[^\d]/g,'')" lay-verify="required|number" >

                </div>
            </div>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">处理备注</label>
                <div class="layui-input-block" style="width:512px">
                    <textarea name="handleMemo"  id="handleMemo" placeholder="请输入" maxlength="500" class="layui-textarea" ></textarea>
                </div>
            </div>
        </div>
    </div>
    <button class="layui-btn layui-btn-danger" type="button" id="addButton" lay-submit="" lay-filter="form">已发货</button>
    <button class="layui-btn" type="button" id="addButton-cancel">取消</button>

</form>
<!--#} -->
<script>
layui.extend({
    loading: '../../../plugins/layui_extends/loading/loading',
}).define([ 'form', 'laydate', 'table','loading','finOrderApi'], function(exports) {
    var form = layui.form;
    var finOrderApi = layui.finOrderApi;
    var index = layui.index;
    var isNew = true;
    <!--# if(!(isEmpty(finOrderJson))){  -->
    isNew = false;
    <!--# } -->
    var view = {
        init:function(){
            Lib.initGenrealForm($("#addForm"),form);
            this.initSubmit();
        },
        initSubmit:function(){
            $("#addButton").click(function(){
                // $("#addButton").hide();
                // $("#addButton-loading").show();
                // $("#addButton-loading").loading();
                form.on('submit(form)', function(){
                    finOrderApi.saveForm(isNew,$('#addForm'),function(){
                        parent.window.dataReload();
                        Common.info("保存成功");
                        Lib.closeFrame();
                    });
                });
            });

            $("#addButton-cancel").click(function(){
                Lib.closeFrame();
            });
        }

    }
    view.init();
    <!--# if(!(isEmpty(finOrderJson))){  -->
    var formJson = ${finOrderJson};
    form.val("editform",formJson);
    <!--# } -->
});
</script>
